package com.nine.entity;


/**
 * FavouriteitemId entity. @author MyEclipse Persistence Tools
 */

public class FavouriteitemId implements java.io.Serializable {

	// Fields

	private Customer customer;
	private Integer itemId;

	// Constructors

	/** default constructor */
	public FavouriteitemId() {
	}

	/** full constructor */
	public FavouriteitemId(Customer customer, Integer itemId) {
		this.customer = customer;
		this.itemId = itemId;
	}

	// Property accessors

	public Customer getCustomer() {
		return this.customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public Integer getItemId() {
		return this.itemId;
	}

	public void setItemId(Integer itemId) {
		this.itemId = itemId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FavouriteitemId))
			return false;
		FavouriteitemId castOther = (FavouriteitemId) other;

		return ((this.getCustomer() == castOther.getCustomer()) || (this
				.getCustomer() != null
				&& castOther.getCustomer() != null && this.getCustomer()
				.equals(castOther.getCustomer())))
				&& ((this.getItemId() == castOther.getItemId()) || (this
						.getItemId() != null
						&& castOther.getItemId() != null && this.getItemId()
						.equals(castOther.getItemId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCustomer() == null ? 0 : this.getCustomer().hashCode());
		result = 37 * result
				+ (getItemId() == null ? 0 : this.getItemId().hashCode());
		return result;
	}

}